package com.heima.test.job;

import org.springframework.scheduling.annotation.Scheduled;
import org.springframework.stereotype.Component;

import java.time.LocalDateTime;

@Component
public class EatJob {

    @Scheduled(cron = "*/5 * * * * ?")
    public void  eat(){
        System.out.println("每隔5秒吃一次饭，目标变成一个大胖子"+ LocalDateTime.now().toString());

    }
}
